#!/bin/csh -f
set echo_style=both
set EPS="0.0001"
set USAGE="USAGE: xyz2copa XYZ_NAME TILING_NAME\n-> generates copa.upd, registering XYZ_NAME with TILING_NAME x decoration from INPUT directory."
if ( $# != 2 ) then
    echo $USAGE | fold -s -w 70
    exit
endif
set XYZNAME=$1
set TNAME=$2
if (! -e $XYZNAME) then 
    echo "XYZ file $XYZNAME does not exist."
    echo $USAGE | fold -s -w 70
    exit
endif
if (! -e $TNAME) then
    echo "Tiling $TNAME does not exist."
    echo $USAGE | fold -s -w 70
    exit
endif
echo -n "$XYZNAME\n$TNAME\n$EPS\n" | $DECAHOME/bin/xyz2copa_
##

